package com.study.example.ex02;

import java.io.FileReader;
import java.io.IOException;

import org.junit.Test;

/**
* @Name: MyBufferedReaderDemo
* @Description: 自定义高效字符读取流测试类
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-1-16 下午3:35:11 
* @Version: V1.0
 */
public class MyBufferedReaderDemo {

	@Test
	public void testMyBufferedReader() throws IOException {
		//创建自定义高效字符读取流
		MyBufferedReader reader = new MyBufferedReader(new FileReader("sort.txt")) ;
		String line = null ;
		//读取文件中的内容
		while((line = reader.readLine()) != null) {
			System.out.println(line);
		}
		//释放资源
		reader.close() ;
	}
	
	
}
